import request from '@/utils/request'

// 查询用户列表
export function listUsers() {
    return request({
        url: '/operations/reimbursement/users',
        method: 'get'
    })
}

// 查询报销申请列表
export function listReimbursement(query) {
    return request({
        url: '/operations/reimbursement/list',
        method: 'get',
        params: query
    })
}

// 查询报销申请详细
export function getReimbursement(id) {
    return request({
        url: '/operations/reimbursement/' + id,
        method: 'get'
    })
}

// 新增报销申请
export function addReimbursement(data) {
    return request({
        url: '/operations/reimbursement',
        method: 'post',
        data: data
    })
}

// 修改报销申请
export function updateReimbursement(data) {
    return request({
        url: '/operations/reimbursement',
        method: 'put',
        data: data
    })
}

// 删除报销申请
export function delReimbursement(id) {
    return request({
        url: '/operations/reimbursement/' + id,
        method: 'delete'
    })
}

// 财务审核报销申请
export function financeReview(data) {
    return request({
        url: '/operations/reimbursement/financeReview',
        method: 'post',
        data: data
    })
}

// Admin审核报销申请
export function adminReview(data) {
    return request({
        url: '/operations/reimbursement/adminReview',
        method: 'post',
        data: data
    })
}

// 标记为已付款
export function markPaid(id) {
    return request({
        url: '/operations/reimbursement/markPaid/' + id,
        method: 'post'
    })
}